<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习</title>
    <script>
        /*
           现在有如下数组：
           var numbers = [1,2,2,3,4,5,4,5,6];
           编写代码去除数组中重复的元素
        */
        var number2= [1,5,1,7,4,8,8,4,6,4,3,1,8];
        var number = [1,2,2,3,4,5,4,5,6];
        var number3 = [7,7,88,11,44,33,44,88,11,44,33,66,12,11,7,88,66,12,34,1,1,1,1,1,1,1,1];
        function removeDuplicates(arr) {
            for (var i=0;i<arr.length;i++){
                for (var j=i+1;j<arr.length;j++)
                while(arr[i] ==arr[j]){
                    arr.splice(j,1);
                }
            }
            return arr;
        }
         var result = removeDuplicates(number3);
        console.log(result+'');
    </script>
</head>
<body>

</body>
</html>